<style>
    .form-group .col-sm-2{
        max-width: 120px;
        min-width: 90px;
    }
</style>

<form id="edit-form" class="form-horizontal" role="form" data-toggle="validator" method="POST" action="">

    <div class="">
        <div class="panel panel-success">
            <div class="panel-heading">
                <h4 class="panel-title">
                    <a data-toggle="collapse"
                       href="#collapseOne">
                        <span>{:__('基本信息')}</span>
                    </a>

                </h4>
            </div>
            <div id="collapseOne" class="panel-collapse collapse in">
                <div class="panel-body">

                    <div class="col-md-4 col-xs-12 form-group">
                        <label for="c-number" class="control-label col-xs-12 col-sm-2">{:__('回款编号')}:</label>
                        <div class="col-xs-12 col-sm-8">
                            <label class="control-label">{$row.number}</label>

                        </div>
                    </div>
                    <div class="col-md-4 col-xs-12 form-group">
                        <label for="c-customer_id" class="control-label col-xs-12 col-sm-2">{:__('客户')}:</label>
                        <div class="col-xs-12 col-sm-8">
                            <label class="control-label">{$row.customer.name}</label>


                        </div>
                    </div>
                    <div class="col-md-4 col-xs-12 form-group">
                        <label for="c-contract_id" class="control-label col-xs-12 col-sm-2">{:__('合同')}:</label>
                        <div class="col-xs-12 col-sm-8">
                            <label class="control-label">{$row.contract.number}</label>

                        </div>
                    </div>




                    <div class="col-md-4 col-xs-12 form-group">
                        <label for="c-money" class="control-label col-xs-12 col-sm-2">{:__('回款金额')}:</label>
                        <div class="col-xs-12 col-sm-8">
                            <label class="control-label">{$row.money}</label>
                        </div>
                    </div>

                    <div class="pay_type"   {if($row["pay_type"]==2)}style="display:none"{/if}>
                    <div class="col-md-4 col-xs-12 form-group">
                        <label for="c-customer_id" class="control-label col-xs-12 col-sm-2">{:__('收款帐户')}:</label>
                        <div class="col-xs-12 col-sm-8">
                            <label class="control-label">{:isset($account_list[$row['account_id']])?$account_list[$row['account_id']]:'未知'}</label>

                        </div>
                    </div>
                    <div class="col-md-4 col-xs-12 form-group">
                        <label for="c-return_time" class="control-label col-xs-12 col-sm-2">{:__('回款日期')}:</label>
                        <div class="col-xs-12 col-sm-8">
                            <label class="control-label">{:datetime($row.return_time)}</label>

                        </div>
                    </div>

                </div>
                <div class="col-md-4 col-xs-12 form-group">
                    <label for="c-flow_admin_id" class="control-label col-xs-12 col-sm-2">{:__('审批人')}:</label>
                    <div class="col-xs-12 col-sm-8">
                        <input id="c-flow_admin_id"  value="{$row.flow_admin_id}"  data-source="facrm/common/selectpage/model/admin/type/all" data-field="nickname" data-multiple="true"  {$flow->config==1?'disabled ':'data-rule="required"'}
                        class="form-control selectpage" name="row[flow_admin_id]" type="text" value="{if $flow->config==1}{$flow->step[0]['admin_ids']}{/if}">
                    </div>
                </div>

                <div class="col-md-4 col-xs-12 form-group">
                    <label for="c-remark" class="control-label col-xs-12 col-sm-2">{:__('备注')}:</label>
                    <div class="col-xs-12 col-sm-8">
                        <label class="control-label">{$row.remark|htmlentities}</label>
                    </div>
                </div>

                </div>
            </div>
        </div>

        <div class="panel-group" id="accordion">
            <div class="panel panel-info">
                <div class="panel-heading">
                    <h4 class="panel-title">
                        <a data-toggle="collapse"
                           href="#collapseThree">
                            收款扩展
                        </a>
                    </h4>
                </div>
                <div id="collapseThree" class="panel-collapse collapse in">
                    <div class="panel-body">
                        <div id="extend"></div>

                    </div>
                </div>
            </div>

        </div>

        <div class="panel panel-default">
        <div class="panel-heading">
            <h4 class="panel-title">
                <a data-toggle="collapse"
                   href="#collapse5">
                    {:__('审核日志')}
                </a>
            </h4>
        </div>
        <div id="collapse5" class="panel-collapse collapse ">
            <div class="panel-body">
                <div class="col-md-12 col-xs-12 form-group">
                    <div class="col-xs-12 col-sm-12">
                        <div class="table-responsive">
                            <table id="table11" class="table table-striped table-bordered table-hover table-nowrap">
                                <thead>
                                <th>{:__('顺序')}</th>
                                <th>{:__('审核人')}</th>
                                <th>{:__('意见')}</th>
                                <th>{:__('状态')}</th>
                                <th>{:__('时间')}</th>
                                </thead>
                                <tbody>
                                {foreach name="row.flow_log" item="v"  index="j" }
                                <tr>
                                    <td>{$j}</td>
                                    <td>
                                        {$v.nickname}({$v.admin_id})
                                    </td>
                                    <td>
                                        {$v.remark}{$v.is_end==1?"（审核结束）":""}
                                    </td>
                                    <td>
                                        {$v.status==1?"通过":"未通过"}
                                    </td>
                                    <td>
                                        {$v.create_time|datetime}
                                    </td>
                                </tr>
                                {/foreach}
                                </tbody>
                            </table>
                        </div>
                    </div>
                </div>

            </div>
        </div>
    </div>

    {if($auth->check('facrm/operatelog/index'))}
    <div class="panel panel-info">
        <div class="panel-heading">
            <h4 class="panel-title">
                <a data-toggle="collapse"
                   href="#collapseseven1">
                    操作记录
                </a>
            </h4>
        </div>
        <div id="collapseseven1" class="panel-collapse collapse in">
            <div class="panel-body">
                <table id="operatelog" class="table table-striped table-bordered table-hover table-nowrap"
                       width="100%">
                </table>

            </div>
        </div>
    </div>
    {/if}


    </div>





    {if (isset($action)&&$action=="detail")}
    {else/}
    <div class="form-group layer-footer">
        <label class="control-label col-xs-12 col-sm-2"></label>
        <div class="col-xs-12 col-sm-8">
            <button type="submit" class="btn btn-success btn-embossed disabled">{:__('OK')}</button>
            <button type="reset" class="btn btn-default btn-embossed">{:__('Reset')}</button>
        </div>
    </div>
    {/if}
</form>

<script>
    var contract_id="{$row.contract_id}";
    var ids="{$row.id}";
</script>




